// 统一导出所有常量

// 支付渠道相关
export * from './channels';

// 服务商相关
export * from './providers';

// 通用状态常量
export const STATUS_OPTIONS = [
  { label: '启用', value: 1, color: 'green' },
  { label: '禁用', value: 0, color: 'red' }
];

// 环境类型常量
export const SANDBOX_OPTIONS = [
  { label: '生产', value: 0, color: 'green' },
  { label: '沙箱', value: 1, color: 'orange' }
];

// 获取状态文本
export const getStatusText = (status: number): string => {
  const option = STATUS_OPTIONS.find(item => item.value === status);
  return option?.label || '未知';
};

// 获取状态颜色
export const getStatusColor = (status: number): string => {
  const option = STATUS_OPTIONS.find(item => item.value === status);
  return option?.color || 'default';
};

// 获取环境文本
export const getSandboxText = (isSandbox: number): string => {
  const option = SANDBOX_OPTIONS.find(item => item.value === isSandbox);
  return option?.label || '未知';
};

// 获取环境颜色
export const getSandboxColor = (isSandbox: number): string => {
  const option = SANDBOX_OPTIONS.find(item => item.value === isSandbox);
  return option?.color || 'default';
};